<template>
  <div class="td-doctor-me">
    <div class="me-header">
      <div class="me-header-bg">
        <img :src="user.IconPath" alt>
      </div>
      <div class="me-header-user-name">{{user.DoctorName}}</div>
      <i class="icon font_family icon-td-shezhi" @click="$router.push({name:'tdDoctorMeSetting'})"></i>
    </div>
    <div class="me-menus">
      <mt-cell title="认证信息" is-link @click.native="toPath('tdDoctorMeBaseInfo')">
        <img slot="icon" src="../../../assets/images/doctor/me-renzheng.png" width="24" height="24">
      </mt-cell>
      <mt-cell title="我的患者" is-link @click.native="toPath('tdOrder')">
        <img slot="icon" src="../../../assets/images/doctor/me-huanzhe.png" width="24" height="24">
      </mt-cell>
      <mt-cell title="预约项目设置" is-link @click.native="toPath('tdDoctorMeAppointmentItem')">
        <img
          slot="icon"
          src="../../../assets/images/doctor/me-tiaozheng.png"
          width="24"
          height="24"
        >
      </mt-cell>
      <mt-cell title="预约时间设置" is-link @click.native="toPath('tdDoctorMeAppointmentTime')">
        <img
          slot="icon"
          src="../../../assets/images/doctor/me-tiaozheng.png"
          width="24"
          height="24"
        >
      </mt-cell>
      <mt-cell title="被预约记录" is-link @click.native="toPath('tdDoctorMeAppointmentRecord')">
        <img slot="icon" src="../../../assets/images/doctor/me-tianding.png" width="24" height="24">
      </mt-cell>
    </div>
  </div>
</template>

<script>
export default {
  name: "TianDingDoctorMeComponent",
  data() {
    return {
      user: {}
    };
  },
  mounted() {
    this.user = JSON.parse(this.local$.getItem("tdUser"));
  },
  methods: {
    toPath(name) {
      if (this.user.AuditStatus === 0 || this.user.AuditStatus === 1) {
        this.$router.push({ name: "tdDoctorInfo" });
      } else {
        this.$router.push({ name: name });
      }
    }
  }
};
</script>
